#include <stdio.h>
#include <stdlib.h>

typedef struct Node
{
    float   flen;
    struct  Node* next;
}Node;

int need(float flen)
{
    int     i = 1;
    float   f = 0.0;
    if(flen == 0)
        return 0;
    do
    {
        f += (1.0/(i + 1));
        i++;
    }while(f < flen);
    return i-1;
}
int main()
{
    float   flen;
    Node    *p, *q, *head = NULL;
    scanf("%f", &flen);

    while(flen != 0.00)
    {
        p = (Node*)malloc(sizeof(Node));
        p->flen = flen;
        p->next = NULL;
        if(head == NULL)
        {
            head = p;
        }
        else
        {
            q->next = p;
        }
        q = p;
        scanf("%f", &flen);
    }
    for(p = head; p != NULL; p = p->next)
    {
        printf("%d card(s)\r\n", need(p->flen));
    }
    return 0;
}
